<template name="header">
  <div class="ui top fixed inverted big icon borderless menu">
    <div class="ui fluid container">
      <a class="item {{isActiveRoute 'home'}}" href="/" title="Torrents Duck">
        <img src="/img/duck_white.svg" alt="Torrents Duck">
        <!-- {{> logo src='/img/duck_white.svg' class='mini'}} -->
      </a>
      {{#if isValidOrIsAdmin}}
        <a class="item {{isActiveRoute 'explorer'}}" title="{{_ 'files_explorer'}}" href="/explorer"><i class="large folder open icon"></i></a>
      {{/if}}
      <a class="item" title="{{_ 'thanks'}}" href="https://paypal.me/cmapage" target="_blanck"><i class="large beer icon"></i></a>
      {{#if currentUser.isAdmin}}
        <a class="item {{isActiveRoute 'usersList'}}" title="{{_ 'users_list'}}" href="/users-list"><i class="large users icon"></i></a>
      {{/if}}
      <div class="right menu">
        {{#if isFrench}}
        <a href="?lang=en" class="item" title="English">EN</a>
        {{else}}
        <a href="?lang=fr" class="item" title="Français">FR</a>
        {{/if}}
        {{#if currentUser}}
          <div class="item" title="{{_ 'logout'}}" id="logout"><i class="large power icon"></i></div>
        {{else}}
          <a class="item" title="{{_ 'login'}}" href="/sign-in"><i class="large user icon"></i></a>
        {{/if}}
      </div>
    </div>
  </div>

  <!-- Log out modal -->
  <div class="ui basic modal" id="logoutModal">
    <div class="ui icon header">
      <i class="red power icon"></i>
      {{_ 'SIGN_OUT'}}
    </div>
    <div class="content center-this">
      <p>{{_ 'really_log_out'}}</p>
    </div>
    <div class="actions">
      <div class="center-this">
        <div class="ui red cancel inverted button">
          <i class="remove icon"></i>
          {{_ 'NO'}}
        </div>
        <div class="ui green ok inverted button">
          <i class="checkmark icon"></i>
          {{_ 'YES'}}
        </div>
      </div>
    </div>
  </div>
</template>
